package com.nstar.sinaweibo.model
{
	public class OptionsVO
	{
		
		public static const B_TIP_FRIENDS:String 		= "tipFriends";
		public static const B_TIP_MENTIONS:String 		= "tipMentions";
		public static const B_TIP_COMMENTS:String 		= "tipComments";
		public static const B_TIP_DIRECT_MSGS:String 	= "tipDirectMsgs";
		public static const B_TIP_FOLLOWERS:String 		= "tipFollowers";
		
		public static const B_VERSION_CHECK:String		= "versionCheck";
		public static const B_AUTO_REFRESH:String		= "autoRefresh";
		public static const B_POPUP_WIN:String			= "popupWin";
		public static const B_ALWAYS_IN_FRONT:String	= "alwaysInFront";
		public static const B_USE_FACE:String			= "useFace";
		
		public static const N_REFRESH_INTERVAL:String	= "refreshInterval";
		public static const S_CURRENT_THEME:String		= "currentTheme";
				
		public static const DEFAULT_COUNT:int 					= 20;
		public static const DEFAULT_AUTO_VERSION_CHECK:Boolean 	= true;
		public static const DEFAULT_AUTO_REFRESH:Boolean 		= true;
		public static const DEFAULT_REFRESH_INTERVAL:uint 		= 10;//自动刷新时间间隔，分钟
		public static const DEFAULT_CHECK_FRIENDS:Boolean 		= true;
		public static const DEFAULT_CHECK_MENTIONS:Boolean 		= true;
		public static const DEFAULT_CHECK_COMMENT:Boolean 		= true;
		public static const DEFAULT_CHECK_DIRECT_MSG:Boolean 	= true;
		public static const DEFAULT_CHECK_FOLLOWERS:Boolean 	= true;
		public static const DEFAULT_POPUP_MSG_WINDOW:Boolean 	= true;
		public static const DEFAULT_POPUP_DELAY:Number		 	= 4;
		public static const DEFAULT_ALWAYS_IN_FRONT:Boolean 	= false;
		public static const DEFAULT_USE_ZEBRA_CROSSING:Boolean 	= false;
		public static const DEFAULT_USE_FACE:Boolean 			= true;
		public static const DEFAULT_THEME:String 				= "DefaultStyle.swf";
		
		
		public var firstRun:Boolean = false;
		
		public static var count:int					= DEFAULT_COUNT;//每次获取微博的数量
		public static var autoVersionCheck:Boolean	= DEFAULT_AUTO_VERSION_CHECK;//版本自动更新检查
		public static var autoRefresh:Boolean		= DEFAULT_AUTO_REFRESH;//开启自动刷新
		public static var refreshInterval:uint 		= DEFAULT_REFRESH_INTERVAL;//自动刷新间隔，单位：分钟
		public static var checkFriends:Boolean 		= DEFAULT_CHECK_FRIENDS;//检查关注微博
		public static var checkMentions:Boolean 	= DEFAULT_CHECK_MENTIONS;//检查提到我的
		public static var checkComment:Boolean 		= DEFAULT_CHECK_COMMENT;//检查评论
		public static var checkDirectMsg:Boolean 	= DEFAULT_CHECK_DIRECT_MSG;//检查私信
		public static var checkFollowers:Boolean 	= DEFAULT_CHECK_FOLLOWERS;//检查粉丝
		
		public static var popupMsgWindow:Boolean	= DEFAULT_POPUP_MSG_WINDOW;//弹出新消息提示窗口
		public static var popupDelay:Number			= DEFAULT_POPUP_DELAY;//弹出新消息提示窗口的仪停留时间
		
		public static var alwaysInFront:Boolean		= DEFAULT_ALWAYS_IN_FRONT;//窗口一直在最顶层
		
		public static var useZebraCrossing:Boolean	= DEFAULT_USE_ZEBRA_CROSSING;//微博列表背景使用斑马线分割
		public static var useFace:Boolean			= DEFAULT_USE_FACE;//使用表情
		public static var currentTheme:String		= DEFAULT_THEME;//当前主题
		
		public function OptionsVO()
		{
		}
		
		//同步选项设置的数据到VO对象
		public static function sync(data:Object):void{
			checkFriends 		= data[B_TIP_FRIENDS];
			checkMentions 		= data[B_TIP_MENTIONS];
			checkComment 		= data[B_TIP_COMMENTS];
			checkDirectMsg 		= data[B_TIP_DIRECT_MSGS];
			checkFollowers 		= data[B_TIP_FOLLOWERS];
			autoVersionCheck 	= data[B_VERSION_CHECK];
			autoRefresh 		= data[B_AUTO_REFRESH];
			alwaysInFront 		= data[B_ALWAYS_IN_FRONT];
			popupDelay 			= data[N_REFRESH_INTERVAL];
			useFace 			= data[B_USE_FACE];
		}
		
		public static function print():void{
			trace( "======================选项设置=======================\n" +
				"autoVersionCheck = " + autoVersionCheck + "\n" +
				"autoRefresh = " + autoRefresh + "\n" +
				"refreshInterval = " + refreshInterval + "\n" +
				"checkFriends = " + checkFriends + "\n" +
				"checkMentions = " + checkMentions + "\n" +
				"checkComment = " + checkComment + "\n" +
				"checkDirectMsg = " + checkDirectMsg + "\n" +
				"checkFollowers = " + checkFollowers + "\n" +
				"useFace = " + useFace + "\n" +
				"currentTheme = " + currentTheme + "\n" +
				"====================================================\n");
		}

	}
}